# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=belcard
pkgver=5.3.83
pkgrel=0
pkgdesc="C++ library to manipulate VCard standard format"
url="https://linphone.org/"
arch="all"
license="GPL-3.0-or-later"
options="!check" # not test available
makedepends="cmake bctoolbox-dev belr-dev samurai"
subpackages="$pkgname-dev $pkgname-libs"
source="$pkgname-$pkgver.tar.bz2::https://gitlab.linphone.org/BC/public/belcard/-/archive/$pkgver/belcard-$pkgver.tar.bz2
	fix-cmake-path.patch
	"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DCMAKE_INSTALL_DATADIR=share \
		-DENABLE_STRICT=NO \
		-DBUILD_SHARED_LIBS=YES \
		-DENABLE_STATIC=NO \
		-DENABLE_UNIT_TESTS=NO
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2a5e5058f0a764cb0128abbfe10b1e9dd7a0139ca83219e2890445fae9a911de73d5a3598ebc4fb82ab5de1c442ff7cded2c6ec6466b3f1be31f7ddea9431aa3  belcard-5.3.83.tar.bz2
325ded3645fa04c65a171b17fcdd69e3bb877f5e3f07935dfc0cad624921733d1ef9bb715705a61bf806129b055462f505ed6698df95d5e1d1b09105f274ee81  fix-cmake-path.patch
"
